/*
 * @Author: EyeSklear 1814580085@qq.com
 * @Date: 2024-01-13 14:56:58
 * @LastEditors: EyeSklear 1814580085@qq.com
 * @LastEditTime: 2024-04-15 21:53:46
 * @FilePath: \Scene_Back\src\imageraster\entities\imageraster.entity.ts
 * @Description:
 *
 * Copyright (c) 2024 by EyeSklear , All Rights Reserved.
 */
import {
  Entity,
  Column,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
  BeforeInsert,
} from 'typeorm';
import { v4 as uuidv4 } from 'uuid';
@Entity()
export class Imageraster {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column()
  creator: string;

  @Column()
  file_id: string;

  @Column({
    type: 'timestamp without time zone',
    default: () => 'CURRENT_TIMESTAMP',
  })
  create_time: Date;

  @UpdateDateColumn({
    type: 'timestamp without time zone',
    default: () => 'CURRENT_TIMESTAMP',
  })
  update_time: Date;

  @Column()
  start: number;

  @Column()
  finish: number;

  @Column()
  keepLive: boolean;

  @Column('simple-json')
  paint: object;

  // 标识场景实例的使用的file_id 是公共资源的还是用户资源的
  @Column('enum', { enum: ['user', 'public'], default: 'user' })
  resource_type: string;
}
